//
//  DFNavigationController.swift
//  DailyFresh
//
//  Created by Arthur on 2017/9/19.
//  Copyright © 2017年 DailyFresh. All rights reserved.
//

import UIKit
import AMScrollingNavbar

class DFNavigationController: ScrollingNavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
//        self.shouldScrollWhenContentFits = true
        self.navigationBar.isTranslucent = false
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }
    
}

extension DFNavigationController {
    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        if childViewControllers.count > 0 {
            viewController.hidesBottomBarWhenPushed = true
        }
        
        super.pushViewController(viewController, animated: animated)
    }
}
